package vote.ai.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import vote.ai.domain.enums.CorrectionModel;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "文本纠错匹配结果")
public class TextCorrectionMatchResp {
    @Schema(description = "纠错模型来源")
    private CorrectionModel modelSource;
    @Schema(description = "纠错模型来源名称")
    private String modelSourceName;
    @Schema(description = "纠错网站来源")
    private String linkSource;
    @Schema(description = "错误文本开始下标")
    private int errorStartIndex;
    @Schema(description = "错误文本结束下标")
    private int errorEndIndex;
    @Schema(description = "错误文本")
    private String errorText;
    @Schema(description = "正确文本")
    private String correctText;
    @Schema(description = "学习时间，暂时返回当前时间")
    private LocalDateTime now;
    @Schema(description = "纠错问题类型")
    private String errorType;
    @Schema(description = "错误字符位置")
    private int errorCharPosition;
    @Schema(description = "错误字符")
    private String errorChar;
    @Schema(description = "纠错后的字符位置")
    private int correctCharPosition;
    @Schema(description = "纠错后的字符")
    private String correctChar;
    private String level;
    public TextCorrectionMatchResp(CorrectionModel modelSource, String modelSourceName, String linkSource, int errorStartIndex, int errorEndIndex, String errorText, String correctText, LocalDateTime now, String errorType, int accuratePosition, String level) {
        this.modelSource = modelSource;
        this.modelSourceName = modelSourceName;
        this.linkSource = linkSource;
        this.errorStartIndex = errorStartIndex;
        this.errorEndIndex = errorEndIndex;
        this.errorText = errorText;
        this.correctText = correctText;
        this.now = now;
        this.errorType = errorType;
        this.errorCharPosition = accuratePosition;
        this.level = level;
    }
}
